curl -X GET\
\
\
-H "Accept: application/json"\
"https://youtube.googleapis.com//youtube/v3/search?$.xgafv=&access_token=&alt=&callback=&fields=&key=&oauth_token=&prettyPrint="aUser=&upload_protocol=&uploadType=&part=&channelId=&channelType=&eventType=&forContentOwner=&forDeveloper=&forMine=&location=&locationRadius=&maxResults=&onBehalfOfContentOwner=&order=&pageToken=&publishedAfter=&publishedBefore=&q=®ionCode=&relatedToVideoId=&relevanceLanguage=&safeSearch=&topicId=&type=&videoCaption=&videoCategoryId=&videoDefinition=&videoDimension=&videoDuration=&videoEmbeddable=&videoLicense=&videoSyndicated=&videoType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SearchApi;
import java.io.File;
import java.util.*;
public class SearchApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: Oauth2
OAuth Oauth2 = (OAuth) defaultClient.getAuthentication("Oauth2");
Oauth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure OAuth2 access token for authorization: Oauth2c
OAuth Oauth2c = (OAuth) defaultClient.getAuthentication("Oauth2c");
Oauth2c.setAccessToken("YOUR ACCESS TOKEN");
SearchApi apiInstance = new SearchApi();
array[String] part = ; // array[String] | The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
String $.xgafv = $.xgafv_example; // String | V1 error format.
String accessToken = accessToken_example; // String | OAuth access token.
String alt = alt_example; // String | Data format for response.
String callback = callback_example; // String | JSONP
String fields = fields_example; // String | Selector specifying which fields to include in a partial response.
String key = key_example; // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
String oauthToken = oauthToken_example; // String | OAuth 2.0 token for the current user.
Boolean prettyPrint = true; // Boolean | Returns response with indentations and line breaks.
String quotaUser = quotaUser_example; // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
String uploadProtocol = uploadProtocol_example; // String | Upload protocol for media (e.g. "raw", "multipart").
String uploadType = uploadType_example; // String | Legacy upload protocol for media (e.g. "media", "multipart").
String channelId = channelId_example; // String | Filter on resources belonging to this channelId.
String channelType = channelType_example; // String | Add a filter on the channel search.
String eventType = eventType_example; // String | Filter on the livestream status of the videos.
Boolean forContentOwner = true; // Boolean | Search owned by a content owner.
Boolean forDeveloper = true; // Boolean | Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
Boolean forMine = true; // Boolean | Search for the private videos of the authenticated user.
String location = location_example; // String | Filter on location of the video
String locationRadius = locationRadius_example; // String | Filter on distance from the location (specified above).
Integer maxResults = 56; // Integer | The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
String onBehalfOfContentOwner = onBehalfOfContentOwner_example; // String | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
String order = order_example; // String | Sort order of the results.
String pageToken = pageToken_example; // String | The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
String publishedAfter = publishedAfter_example; // String | Filter on resources published after this date.
String publishedBefore = publishedBefore_example; // String | Filter on resources published before this date.
String q = q_example; // String | Textual search terms to match.
String regionCode = regionCode_example; // String | Display the content as seen by viewers in this country.
String relatedToVideoId = relatedToVideoId_example; // String | Search related to a resource.
String relevanceLanguage = relevanceLanguage_example; // String | Return results relevant to this language.
String safeSearch = safeSearch_example; // String | Indicates whether the search results should include restricted content as well as standard content.
String topicId = topicId_example; // String | Restrict results to a particular topic.
array[String] type = ; // array[String] | Restrict results to a particular set of resource types from One Platform.
String videoCaption = videoCaption_example; // String | Filter on the presence of captions on the videos.
String videoCategoryId = videoCategoryId_example; // String | Filter on videos in a specific category.
String videoDefinition = videoDefinition_example; // String | Filter on the definition of the videos.
String videoDimension = videoDimension_example; // String | Filter on 3d videos.
String videoDuration = videoDuration_example; // String | Filter on the duration of the videos.
String videoEmbeddable = videoEmbeddable_example; // String | Filter on embeddable videos.
String videoLicense = videoLicense_example; // String | Filter on the license of the videos.
String videoSyndicated = videoSyndicated_example; // String | Filter on syndicated videos.
String videoType = videoType_example; // String | Filter on videos of a specific type.
try {
SearchListResponse result = apiInstance.youtube.search.list(part, $.xgafv, accessToken, alt, callback, fields, key, oauthToken, prettyPrint, quotaUser, uploadProtocol, uploadType, channelId, channelType, eventType, forContentOwner, forDeveloper, forMine, location, locationRadius, maxResults, onBehalfOfContentOwner, order, pageToken, publishedAfter, publishedBefore, q, regionCode, relatedToVideoId, relevanceLanguage, safeSearch, topicId, type, videoCaption, videoCategoryId, videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoSyndicated, videoType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SearchApi#youtube.search.list");
e.printStackTrace();
}
}
}
import io.swagger.client.api.SearchApi;
public class SearchApiExample {
public static void main(String[] args) {
SearchApi apiInstance = new SearchApi();
array[String] part = ; // array[String] | The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
String $.xgafv = $.xgafv_example; // String | V1 error format.
String accessToken = accessToken_example; // String | OAuth access token.
String alt = alt_example; // String | Data format for response.
String callback = callback_example; // String | JSONP
String fields = fields_example; // String | Selector specifying which fields to include in a partial response.
String key = key_example; // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
String oauthToken = oauthToken_example; // String | OAuth 2.0 token for the current user.
Boolean prettyPrint = true; // Boolean | Returns response with indentations and line breaks.
String quotaUser = quotaUser_example; // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
String uploadProtocol = uploadProtocol_example; // String | Upload protocol for media (e.g. "raw", "multipart").
String uploadType = uploadType_example; // String | Legacy upload protocol for media (e.g. "media", "multipart").
String channelId = channelId_example; // String | Filter on resources belonging to this channelId.
String channelType = channelType_example; // String | Add a filter on the channel search.
String eventType = eventType_example; // String | Filter on the livestream status of the videos.
Boolean forContentOwner = true; // Boolean | Search owned by a content owner.
Boolean forDeveloper = true; // Boolean | Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
Boolean forMine = true; // Boolean | Search for the private videos of the authenticated user.
String location = location_example; // String | Filter on location of the video
String locationRadius = locationRadius_example; // String | Filter on distance from the location (specified above).
Integer maxResults = 56; // Integer | The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
String onBehalfOfContentOwner = onBehalfOfContentOwner_example; // String | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
String order = order_example; // String | Sort order of the results.
String pageToken = pageToken_example; // String | The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
String publishedAfter = publishedAfter_example; // String | Filter on resources published after this date.
String publishedBefore = publishedBefore_example; // String | Filter on resources published before this date.
String q = q_example; // String | Textual search terms to match.
String regionCode = regionCode_example; // String | Display the content as seen by viewers in this country.
String relatedToVideoId = relatedToVideoId_example; // String | Search related to a resource.
String relevanceLanguage = relevanceLanguage_example; // String | Return results relevant to this language.
String safeSearch = safeSearch_example; // String | Indicates whether the search results should include restricted content as well as standard content.
String topicId = topicId_example; // String | Restrict results to a particular topic.
array[String] type = ; // array[String] | Restrict results to a particular set of resource types from One Platform.
String videoCaption = videoCaption_example; // String | Filter on the presence of captions on the videos.
String videoCategoryId = videoCategoryId_example; // String | Filter on videos in a specific category.
String videoDefinition = videoDefinition_example; // String | Filter on the definition of the videos.
String videoDimension = videoDimension_example; // String | Filter on 3d videos.
String videoDuration = videoDuration_example; // String | Filter on the duration of the videos.
String videoEmbeddable = videoEmbeddable_example; // String | Filter on embeddable videos.
String videoLicense = videoLicense_example; // String | Filter on the license of the videos.
String videoSyndicated = videoSyndicated_example; // String | Filter on syndicated videos.
String videoType = videoType_example; // String | Filter on videos of a specific type.
try {
SearchListResponse result = apiInstance.youtube.search.list(part, $.xgafv, accessToken, alt, callback, fields, key, oauthToken, prettyPrint, quotaUser, uploadProtocol, uploadType, channelId, channelType, eventType, forContentOwner, forDeveloper, forMine, location, locationRadius, maxResults, onBehalfOfContentOwner, order, pageToken, publishedAfter, publishedBefore, q, regionCode, relatedToVideoId, relevanceLanguage, safeSearch, topicId, type, videoCaption, videoCategoryId, videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoSyndicated, videoType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SearchApi#youtube.search.list");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2c)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
array[String] *part = ; // The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
String *$.xgafv = $.xgafv_example; // V1 error format. (optional)
String *accessToken = accessToken_example; // OAuth access token. (optional)
String *alt = alt_example; // Data format for response. (optional)
String *callback = callback_example; // JSONP (optional)
String *fields = fields_example; // Selector specifying which fields to include in a partial response. (optional)
String *key = key_example; // API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. (optional)
String *oauthToken = oauthToken_example; // OAuth 2.0 token for the current user. (optional)
Boolean *prettyPrint = true; // Returns response with indentations and line breaks. (optional)
String *quotaUser = quotaUser_example; // Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. (optional)
String *uploadProtocol = uploadProtocol_example; // Upload protocol for media (e.g. "raw", "multipart"). (optional)
String *uploadType = uploadType_example; // Legacy upload protocol for media (e.g. "media", "multipart"). (optional)
String *channelId = channelId_example; // Filter on resources belonging to this channelId. (optional)
String *channelType = channelType_example; // Add a filter on the channel search. (optional)
String *eventType = eventType_example; // Filter on the livestream status of the videos. (optional)
Boolean *forContentOwner = true; // Search owned by a content owner. (optional)
Boolean *forDeveloper = true; // Restrict the search to only retrieve videos uploaded using the project id of the authenticated user. (optional)
Boolean *forMine = true; // Search for the private videos of the authenticated user. (optional)
String *location = location_example; // Filter on location of the video (optional)
String *locationRadius = locationRadius_example; // Filter on distance from the location (specified above). (optional)
Integer *maxResults = 56; // The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. (optional)
String *onBehalfOfContentOwner = onBehalfOfContentOwner_example; // *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. (optional)
String *order = order_example; // Sort order of the results. (optional)
String *pageToken = pageToken_example; // The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. (optional)
String *publishedAfter = publishedAfter_example; // Filter on resources published after this date. (optional)
String *publishedBefore = publishedBefore_example; // Filter on resources published before this date. (optional)
String *q = q_example; // Textual search terms to match. (optional)
String *regionCode = regionCode_example; // Display the content as seen by viewers in this country. (optional)
String *relatedToVideoId = relatedToVideoId_example; // Search related to a resource. (optional)
String *relevanceLanguage = relevanceLanguage_example; // Return results relevant to this language. (optional)
String *safeSearch = safeSearch_example; // Indicates whether the search results should include restricted content as well as standard content. (optional)
String *topicId = topicId_example; // Restrict results to a particular topic. (optional)
array[String] *type = ; // Restrict results to a particular set of resource types from One Platform. (optional)
String *videoCaption = videoCaption_example; // Filter on the presence of captions on the videos. (optional)
String *videoCategoryId = videoCategoryId_example; // Filter on videos in a specific category. (optional)
String *videoDefinition = videoDefinition_example; // Filter on the definition of the videos. (optional)
String *videoDimension = videoDimension_example; // Filter on 3d videos. (optional)
String *videoDuration = videoDuration_example; // Filter on the duration of the videos. (optional)
String *videoEmbeddable = videoEmbeddable_example; // Filter on embeddable videos. (optional)
String *videoLicense = videoLicense_example; // Filter on the license of the videos. (optional)
String *videoSyndicated = videoSyndicated_example; // Filter on syndicated videos. (optional)
String *videoType = videoType_example; // Filter on videos of a specific type. (optional)
SearchApi *apiInstance = [[SearchApi alloc] init];
[apiInstance youtube.search.listWith:part
$.xgafv:$.xgafv
accessToken:accessToken
alt:alt
callback:callback
fields:fields
key:key
oauthToken:oauthToken
prettyPrint:prettyPrint
quotaUser:quotaUser
uploadProtocol:uploadProtocol
uploadType:uploadType
channelId:channelId
channelType:channelType
eventType:eventType
forContentOwner:forContentOwner
forDeveloper:forDeveloper
forMine:forMine
location:location
locationRadius:locationRadius
maxResults:maxResults
onBehalfOfContentOwner:onBehalfOfContentOwner
order:order
pageToken:pageToken
publishedAfter:publishedAfter
publishedBefore:publishedBefore
q:q
regionCode:regionCode
relatedToVideoId:relatedToVideoId
relevanceLanguage:relevanceLanguage
safeSearch:safeSearch
topicId:topicId
type:type
videoCaption:videoCaption
videoCategoryId:videoCategoryId
videoDefinition:videoDefinition
videoDimension:videoDimension
videoDuration:videoDuration
videoEmbeddable:videoEmbeddable
videoLicense:videoLicense
videoSyndicated:videoSyndicated
videoType:videoType
completionHandler: ^(SearchListResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var YouTubeDataApiV3 = require('you_tube_data_api_v3');
var defaultClient = YouTubeDataApiV3.ApiClient.instance;
// Configure OAuth2 access token for authorization: Oauth2
var Oauth2 = defaultClient.authentications['Oauth2'];
Oauth2.accessToken = "YOUR ACCESS TOKEN"
// Configure OAuth2 access token for authorization: Oauth2c
var Oauth2c = defaultClient.authentications['Oauth2c'];
Oauth2c.accessToken = "YOUR ACCESS TOKEN"
var api = new YouTubeDataApiV3.SearchApi()
var part = ; // {{array[String]}} The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
var opts = {
'$.xgafv': $.xgafv_example, // {{String}} V1 error format.
'accessToken': accessToken_example, // {{String}} OAuth access token.
'alt': alt_example, // {{String}} Data format for response.
'callback': callback_example, // {{String}} JSONP
'fields': fields_example, // {{String}} Selector specifying which fields to include in a partial response.
'key': key_example, // {{String}} API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
'oauthToken': oauthToken_example, // {{String}} OAuth 2.0 token for the current user.
'prettyPrint': true, // {{Boolean}} Returns response with indentations and line breaks.
'quotaUser': quotaUser_example, // {{String}} Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
'uploadProtocol': uploadProtocol_example, // {{String}} Upload protocol for media (e.g. "raw", "multipart").
'uploadType': uploadType_example, // {{String}} Legacy upload protocol for media (e.g. "media", "multipart").
'channelId': channelId_example, // {{String}} Filter on resources belonging to this channelId.
'channelType': channelType_example, // {{String}} Add a filter on the channel search.
'eventType': eventType_example, // {{String}} Filter on the livestream status of the videos.
'forContentOwner': true, // {{Boolean}} Search owned by a content owner.
'forDeveloper': true, // {{Boolean}} Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
'forMine': true, // {{Boolean}} Search for the private videos of the authenticated user.
'location': location_example, // {{String}} Filter on location of the video
'locationRadius': locationRadius_example, // {{String}} Filter on distance from the location (specified above).
'maxResults': 56, // {{Integer}} The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
'onBehalfOfContentOwner': onBehalfOfContentOwner_example, // {{String}} *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
'order': order_example, // {{String}} Sort order of the results.
'pageToken': pageToken_example, // {{String}} The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
'publishedAfter': publishedAfter_example, // {{String}} Filter on resources published after this date.
'publishedBefore': publishedBefore_example, // {{String}} Filter on resources published before this date.
'q': q_example, // {{String}} Textual search terms to match.
'regionCode': regionCode_example, // {{String}} Display the content as seen by viewers in this country.
'relatedToVideoId': relatedToVideoId_example, // {{String}} Search related to a resource.
'relevanceLanguage': relevanceLanguage_example, // {{String}} Return results relevant to this language.
'safeSearch': safeSearch_example, // {{String}} Indicates whether the search results should include restricted content as well as standard content.
'topicId': topicId_example, // {{String}} Restrict results to a particular topic.
'type': , // {{array[String]}} Restrict results to a particular set of resource types from One Platform.
'videoCaption': videoCaption_example, // {{String}} Filter on the presence of captions on the videos.
'videoCategoryId': videoCategoryId_example, // {{String}} Filter on videos in a specific category.
'videoDefinition': videoDefinition_example, // {{String}} Filter on the definition of the videos.
'videoDimension': videoDimension_example, // {{String}} Filter on 3d videos.
'videoDuration': videoDuration_example, // {{String}} Filter on the duration of the videos.
'videoEmbeddable': videoEmbeddable_example, // {{String}} Filter on embeddable videos.
'videoLicense': videoLicense_example, // {{String}} Filter on the license of the videos.
'videoSyndicated': videoSyndicated_example, // {{String}} Filter on syndicated videos.
'videoType': videoType_example // {{String}} Filter on videos of a specific type.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.youtube.search.list(part, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class youtube.search.listExample
{
public void main()
{
// Configure OAuth2 access token for authorization: Oauth2
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure OAuth2 access token for authorization: Oauth2c
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new SearchApi();
var part = new array[String](); // array[String] | The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
var $.xgafv = $.xgafv_example; // String | V1 error format. (optional)
var accessToken = accessToken_example; // String | OAuth access token. (optional)
var alt = alt_example; // String | Data format for response. (optional)
var callback = callback_example; // String | JSONP (optional)
var fields = fields_example; // String | Selector specifying which fields to include in a partial response. (optional)
var key = key_example; // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. (optional)
var oauthToken = oauthToken_example; // String | OAuth 2.0 token for the current user. (optional)
var prettyPrint = true; // Boolean | Returns response with indentations and line breaks. (optional)
var quotaUser = quotaUser_example; // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. (optional)
var uploadProtocol = uploadProtocol_example; // String | Upload protocol for media (e.g. "raw", "multipart"). (optional)
var uploadType = uploadType_example; // String | Legacy upload protocol for media (e.g. "media", "multipart"). (optional)
var channelId = channelId_example; // String | Filter on resources belonging to this channelId. (optional)
var channelType = channelType_example; // String | Add a filter on the channel search. (optional)
var eventType = eventType_example; // String | Filter on the livestream status of the videos. (optional)
var forContentOwner = true; // Boolean | Search owned by a content owner. (optional)
var forDeveloper = true; // Boolean | Restrict the search to only retrieve videos uploaded using the project id of the authenticated user. (optional)
var forMine = true; // Boolean | Search for the private videos of the authenticated user. (optional)
var location = location_example; // String | Filter on location of the video (optional)
var locationRadius = locationRadius_example; // String | Filter on distance from the location (specified above). (optional)
var maxResults = 56; // Integer | The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. (optional)
var onBehalfOfContentOwner = onBehalfOfContentOwner_example; // String | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. (optional)
var order = order_example; // String | Sort order of the results. (optional)
var pageToken = pageToken_example; // String | The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. (optional)
var publishedAfter = publishedAfter_example; // String | Filter on resources published after this date. (optional)
var publishedBefore = publishedBefore_example; // String | Filter on resources published before this date. (optional)
var q = q_example; // String | Textual search terms to match. (optional)
var regionCode = regionCode_example; // String | Display the content as seen by viewers in this country. (optional)
var relatedToVideoId = relatedToVideoId_example; // String | Search related to a resource. (optional)
var relevanceLanguage = relevanceLanguage_example; // String | Return results relevant to this language. (optional)
var safeSearch = safeSearch_example; // String | Indicates whether the search results should include restricted content as well as standard content. (optional)
var topicId = topicId_example; // String | Restrict results to a particular topic. (optional)
var type = new array[String](); // array[String] | Restrict results to a particular set of resource types from One Platform. (optional)
var videoCaption = videoCaption_example; // String | Filter on the presence of captions on the videos. (optional)
var videoCategoryId = videoCategoryId_example; // String | Filter on videos in a specific category. (optional)
var videoDefinition = videoDefinition_example; // String | Filter on the definition of the videos. (optional)
var videoDimension = videoDimension_example; // String | Filter on 3d videos. (optional)
var videoDuration = videoDuration_example; // String | Filter on the duration of the videos. (optional)
var videoEmbeddable = videoEmbeddable_example; // String | Filter on embeddable videos. (optional)
var videoLicense = videoLicense_example; // String | Filter on the license of the videos. (optional)
var videoSyndicated = videoSyndicated_example; // String | Filter on syndicated videos. (optional)
var videoType = videoType_example; // String | Filter on videos of a specific type. (optional)
try
{
SearchListResponse result = apiInstance.youtube.search.list(part, $.xgafv, accessToken, alt, callback, fields, key, oauthToken, prettyPrint, quotaUser, uploadProtocol, uploadType, channelId, channelType, eventType, forContentOwner, forDeveloper, forMine, location, locationRadius, maxResults, onBehalfOfContentOwner, order, pageToken, publishedAfter, publishedBefore, q, regionCode, relatedToVideoId, relevanceLanguage, safeSearch, topicId, type, videoCaption, videoCategoryId, videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoSyndicated, videoType);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling SearchApi.youtube.search.list: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Oauth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2c
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\ApiSearchApi();
$part = ; // array[String] | The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
$$.xgafv = $.xgafv_example; // String | V1 error format.
$accessToken = accessToken_example; // String | OAuth access token.
$alt = alt_example; // String | Data format for response.
$callback = callback_example; // String | JSONP
$fields = fields_example; // String | Selector specifying which fields to include in a partial response.
$key = key_example; // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
$oauthToken = oauthToken_example; // String | OAuth 2.0 token for the current user.
$prettyPrint = true; // Boolean | Returns response with indentations and line breaks.
$quotaUser = quotaUser_example; // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
$uploadProtocol = uploadProtocol_example; // String | Upload protocol for media (e.g. "raw", "multipart").
$uploadType = uploadType_example; // String | Legacy upload protocol for media (e.g. "media", "multipart").
$channelId = channelId_example; // String | Filter on resources belonging to this channelId.
$channelType = channelType_example; // String | Add a filter on the channel search.
$eventType = eventType_example; // String | Filter on the livestream status of the videos.
$forContentOwner = true; // Boolean | Search owned by a content owner.
$forDeveloper = true; // Boolean | Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
$forMine = true; // Boolean | Search for the private videos of the authenticated user.
$location = location_example; // String | Filter on location of the video
$locationRadius = locationRadius_example; // String | Filter on distance from the location (specified above).
$maxResults = 56; // Integer | The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
$onBehalfOfContentOwner = onBehalfOfContentOwner_example; // String | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
$order = order_example; // String | Sort order of the results.
$pageToken = pageToken_example; // String | The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
$publishedAfter = publishedAfter_example; // String | Filter on resources published after this date.
$publishedBefore = publishedBefore_example; // String | Filter on resources published before this date.
$q = q_example; // String | Textual search terms to match.
$regionCode = regionCode_example; // String | Display the content as seen by viewers in this country.
$relatedToVideoId = relatedToVideoId_example; // String | Search related to a resource.
$relevanceLanguage = relevanceLanguage_example; // String | Return results relevant to this language.
$safeSearch = safeSearch_example; // String | Indicates whether the search results should include restricted content as well as standard content.
$topicId = topicId_example; // String | Restrict results to a particular topic.
$type = ; // array[String] | Restrict results to a particular set of resource types from One Platform.
$videoCaption = videoCaption_example; // String | Filter on the presence of captions on the videos.
$videoCategoryId = videoCategoryId_example; // String | Filter on videos in a specific category.
$videoDefinition = videoDefinition_example; // String | Filter on the definition of the videos.
$videoDimension = videoDimension_example; // String | Filter on 3d videos.
$videoDuration = videoDuration_example; // String | Filter on the duration of the videos.
$videoEmbeddable = videoEmbeddable_example; // String | Filter on embeddable videos.
$videoLicense = videoLicense_example; // String | Filter on the license of the videos.
$videoSyndicated = videoSyndicated_example; // String | Filter on syndicated videos.
$videoType = videoType_example; // String | Filter on videos of a specific type.
try {
$result = $api_instance->youtube.search.list($part, $$.xgafv, $accessToken, $alt, $callback, $fields, $key, $oauthToken, $prettyPrint, $quotaUser, $uploadProtocol, $uploadType, $channelId, $channelType, $eventType, $forContentOwner, $forDeveloper, $forMine, $location, $locationRadius, $maxResults, $onBehalfOfContentOwner, $order, $pageToken, $publishedAfter, $publishedBefore, $q, $regionCode, $relatedToVideoId, $relevanceLanguage, $safeSearch, $topicId, $type, $videoCaption, $videoCategoryId, $videoDefinition, $videoDimension, $videoDuration, $videoEmbeddable, $videoLicense, $videoSyndicated, $videoType);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SearchApi->youtube.search.list: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SearchApi;
# Configure OAuth2 access token for authorization: Oauth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2c
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api_instance = WWW::SwaggerClient::SearchApi->new();
my $part = []; # array[String] | The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
my $$.xgafv = $.xgafv_example; # String | V1 error format.
my $accessToken = accessToken_example; # String | OAuth access token.
my $alt = alt_example; # String | Data format for response.
my $callback = callback_example; # String | JSONP
my $fields = fields_example; # String | Selector specifying which fields to include in a partial response.
my $key = key_example; # String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
my $oauthToken = oauthToken_example; # String | OAuth 2.0 token for the current user.
my $prettyPrint = true; # Boolean | Returns response with indentations and line breaks.
my $quotaUser = quotaUser_example; # String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
my $uploadProtocol = uploadProtocol_example; # String | Upload protocol for media (e.g. "raw", "multipart").
my $uploadType = uploadType_example; # String | Legacy upload protocol for media (e.g. "media", "multipart").
my $channelId = channelId_example; # String | Filter on resources belonging to this channelId.
my $channelType = channelType_example; # String | Add a filter on the channel search.
my $eventType = eventType_example; # String | Filter on the livestream status of the videos.
my $forContentOwner = true; # Boolean | Search owned by a content owner.
my $forDeveloper = true; # Boolean | Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
my $forMine = true; # Boolean | Search for the private videos of the authenticated user.
my $location = location_example; # String | Filter on location of the video
my $locationRadius = locationRadius_example; # String | Filter on distance from the location (specified above).
my $maxResults = 56; # Integer | The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
my $onBehalfOfContentOwner = onBehalfOfContentOwner_example; # String | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
my $order = order_example; # String | Sort order of the results.
my $pageToken = pageToken_example; # String | The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
my $publishedAfter = publishedAfter_example; # String | Filter on resources published after this date.
my $publishedBefore = publishedBefore_example; # String | Filter on resources published before this date.
my $q = q_example; # String | Textual search terms to match.
my $regionCode = regionCode_example; # String | Display the content as seen by viewers in this country.
my $relatedToVideoId = relatedToVideoId_example; # String | Search related to a resource.
my $relevanceLanguage = relevanceLanguage_example; # String | Return results relevant to this language.
my $safeSearch = safeSearch_example; # String | Indicates whether the search results should include restricted content as well as standard content.
my $topicId = topicId_example; # String | Restrict results to a particular topic.
my $type = []; # array[String] | Restrict results to a particular set of resource types from One Platform.
my $videoCaption = videoCaption_example; # String | Filter on the presence of captions on the videos.
my $videoCategoryId = videoCategoryId_example; # String | Filter on videos in a specific category.
my $videoDefinition = videoDefinition_example; # String | Filter on the definition of the videos.
my $videoDimension = videoDimension_example; # String | Filter on 3d videos.
my $videoDuration = videoDuration_example; # String | Filter on the duration of the videos.
my $videoEmbeddable = videoEmbeddable_example; # String | Filter on embeddable videos.
my $videoLicense = videoLicense_example; # String | Filter on the license of the videos.
my $videoSyndicated = videoSyndicated_example; # String | Filter on syndicated videos.
my $videoType = videoType_example; # String | Filter on videos of a specific type.
eval {
my $result = $api_instance->youtube.search.list(part => $part, $.xgafv => $$.xgafv, accessToken => $accessToken, alt => $alt, callback => $callback, fields => $fields, key => $key, oauthToken => $oauthToken, prettyPrint => $prettyPrint, quotaUser => $quotaUser, uploadProtocol => $uploadProtocol, uploadType => $uploadType, channelId => $channelId, channelType => $channelType, eventType => $eventType, forContentOwner => $forContentOwner, forDeveloper => $forDeveloper, forMine => $forMine, location => $location, locationRadius => $locationRadius, maxResults => $maxResults, onBehalfOfContentOwner => $onBehalfOfContentOwner, order => $order, pageToken => $pageToken, publishedAfter => $publishedAfter, publishedBefore => $publishedBefore, q => $q, regionCode => $regionCode, relatedToVideoId => $relatedToVideoId, relevanceLanguage => $relevanceLanguage, safeSearch => $safeSearch, topicId => $topicId, type => $type, videoCaption => $videoCaption, videoCategoryId => $videoCategoryId, videoDefinition => $videoDefinition, videoDimension => $videoDimension, videoDuration => $videoDuration, videoEmbeddable => $videoEmbeddable, videoLicense => $videoLicense, videoSyndicated => $videoSyndicated, videoType => $videoType);
print Dumper($result);
};
if ($@) {
warn "Exception when calling SearchApi->youtube.search.list: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: Oauth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.SearchApi()
part = # array[String] | The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
$.xgafv = $.xgafv_example # String | V1 error format. (optional)
accessToken = accessToken_example # String | OAuth access token. (optional)
alt = alt_example # String | Data format for response. (optional)
callback = callback_example # String | JSONP (optional)
fields = fields_example # String | Selector specifying which fields to include in a partial response. (optional)
key = key_example # String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. (optional)
oauthToken = oauthToken_example # String | OAuth 2.0 token for the current user. (optional)
prettyPrint = true # Boolean | Returns response with indentations and line breaks. (optional)
quotaUser = quotaUser_example # String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. (optional)
uploadProtocol = uploadProtocol_example # String | Upload protocol for media (e.g. "raw", "multipart"). (optional)
uploadType = uploadType_example # String | Legacy upload protocol for media (e.g. "media", "multipart"). (optional)
channelId = channelId_example # String | Filter on resources belonging to this channelId. (optional)
channelType = channelType_example # String | Add a filter on the channel search. (optional)
eventType = eventType_example # String | Filter on the livestream status of the videos. (optional)
forContentOwner = true # Boolean | Search owned by a content owner. (optional)
forDeveloper = true # Boolean | Restrict the search to only retrieve videos uploaded using the project id of the authenticated user. (optional)
forMine = true # Boolean | Search for the private videos of the authenticated user. (optional)
location = location_example # String | Filter on location of the video (optional)
locationRadius = locationRadius_example # String | Filter on distance from the location (specified above). (optional)
maxResults = 56 # Integer | The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. (optional)
onBehalfOfContentOwner = onBehalfOfContentOwner_example # String | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. (optional)
order = order_example # String | Sort order of the results. (optional)
pageToken = pageToken_example # String | The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. (optional)
publishedAfter = publishedAfter_example # String | Filter on resources published after this date. (optional)
publishedBefore = publishedBefore_example # String | Filter on resources published before this date. (optional)
q = q_example # String | Textual search terms to match. (optional)
regionCode = regionCode_example # String | Display the content as seen by viewers in this country. (optional)
relatedToVideoId = relatedToVideoId_example # String | Search related to a resource. (optional)
relevanceLanguage = relevanceLanguage_example # String | Return results relevant to this language. (optional)
safeSearch = safeSearch_example # String | Indicates whether the search results should include restricted content as well as standard content. (optional)
topicId = topicId_example # String | Restrict results to a particular topic. (optional)
type = # array[String] | Restrict results to a particular set of resource types from One Platform. (optional)
videoCaption = videoCaption_example # String | Filter on the presence of captions on the videos. (optional)
videoCategoryId = videoCategoryId_example # String | Filter on videos in a specific category. (optional)
videoDefinition = videoDefinition_example # String | Filter on the definition of the videos. (optional)
videoDimension = videoDimension_example # String | Filter on 3d videos. (optional)
videoDuration = videoDuration_example # String | Filter on the duration of the videos. (optional)
videoEmbeddable = videoEmbeddable_example # String | Filter on embeddable videos. (optional)
videoLicense = videoLicense_example # String | Filter on the license of the videos. (optional)
videoSyndicated = videoSyndicated_example # String | Filter on syndicated videos. (optional)
videoType = videoType_example # String | Filter on videos of a specific type. (optional)
try:
api_response = api_instance.youtube/search/list(part, $.xgafv=$.xgafv, accessToken=accessToken, alt=alt, callback=callback, fields=fields, key=key, oauthToken=oauthToken, prettyPrint=prettyPrint, quotaUser=quotaUser, uploadProtocol=uploadProtocol, uploadType=uploadType, channelId=channelId, channelType=channelType, eventType=eventType, forContentOwner=forContentOwner, forDeveloper=forDeveloper, forMine=forMine, location=location, locationRadius=locationRadius, maxResults=maxResults, onBehalfOfContentOwner=onBehalfOfContentOwner, order=order, pageToken=pageToken, publishedAfter=publishedAfter, publishedBefore=publishedBefore, q=q, regionCode=regionCode, relatedToVideoId=relatedToVideoId, relevanceLanguage=relevanceLanguage, safeSearch=safeSearch, topicId=topicId, type=type, videoCaption=videoCaption, videoCategoryId=videoCategoryId, videoDefinition=videoDefinition, videoDimension=videoDimension, videoDuration=videoDuration, videoEmbeddable=videoEmbeddable, videoLicense=videoLicense, videoSyndicated=videoSyndicated, videoType=videoType)
pprint(api_response)
except ApiException as e:
print("Exception when calling SearchApi->youtube.search.list: %s\n" % e)
| Name |
Description |
| $.xgafv |
|
| access_token |
String
OAuth access token.
|
| alt |
String
Data format for response.
|
| callback |
|
| fields |
String
Selector specifying which fields to include in a partial response.
|
| key |
String
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
|
| oauth_token |
String
OAuth 2.0 token for the current user.
|
| prettyPrint |
Boolean
Returns response with indentations and line breaks.
|
| quotaUser |
String
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
|
| upload_protocol |
String
Upload protocol for media (e.g. "raw", "multipart").
|
| uploadType |
String
Legacy upload protocol for media (e.g. "media", "multipart").
|
| part* |
array[String]
The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.
Required
|
| channelId |
String
Filter on resources belonging to this channelId.
|
| channelType |
String
Add a filter on the channel search.
|
| eventType |
String
Filter on the livestream status of the videos.
|
| forContentOwner |
Boolean
Search owned by a content owner.
|
| forDeveloper |
Boolean
Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
|
| forMine |
|
| location |
String
Filter on location of the video
|
| locationRadius |
String
Filter on distance from the location (specified above).
|
| maxResults |
Integer
The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
|
| onBehalfOfContentOwner |
String
*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
|
| order |
String
Sort order of the results.
|
| pageToken |
String
The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
|
| publishedAfter |
String
Filter on resources published after this date.
|
| publishedBefore |
String
Filter on resources published before this date.
|
| q |
String
Textual search terms to match.
|
| regionCode |
String
Display the content as seen by viewers in this country.
|
| relatedToVideoId |
|
| relevanceLanguage |
String
Return results relevant to this language.
|
| safeSearch |
String
Indicates whether the search results should include restricted content as well as standard content.
|
| topicId |
String
Restrict results to a particular topic.
|
| type |
array[String]
Restrict results to a particular set of resource types from One Platform.
|
| videoCaption |
String
Filter on the presence of captions on the videos.
|
| videoCategoryId |
String
Filter on videos in a specific category.
|
| videoDefinition |
String
Filter on the definition of the videos.
|
| videoDimension |
String
Filter on 3d videos.
|
| videoDuration |
String
Filter on the duration of the videos.
|
| videoEmbeddable |
String
Filter on embeddable videos.
|
| videoLicense |
String
Filter on the license of the videos.
|
| videoSyndicated |
String
Filter on syndicated videos.
|
| videoType |
String
Filter on videos of a specific type.
|